<?php
$virual = 0;
include 'base.php';

Base::import('controller.admin.AdminController');

$dbConfig = Base::getConfig('database.default');
Db::instance($dbConfig);

if(!$virual){
    $module     = get_request('m', '');
    $controller = get_request('c', 'main');
    $action     = get_request('a', 'index');
}else{
    $module     = '';
    $controller = '';
    $action     = '';
}

$object  = Controller::loadController('admin', $module, $controller);
if($object && $object instanceof AdminController){
    $object->setAction($action);
    $object->run();
}else{
    exit("no vaild $module, $controller");
}

exit;
echo "<hr />";
echo "$module,$controller,$action";
echo "<hr />";

//print_r($_SERVER);